﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace MyCommon.Filter
{
    public class ApiActionFilter : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            System.Console.WriteLine("------OnActionExecuting------");
            base.OnActionExecuting(filterContext);
        }

        public override void OnActionExecuted(ActionExecutedContext filterContext)
        {
            System.Console.WriteLine("------OnActionExecuted------");
            base.OnActionExecuted(filterContext);
        }

        public override void OnResultExecuting(ResultExecutingContext filterContext)
        {
            System.Console.WriteLine("------OnResultExecuting------");
            base.OnResultExecuting(filterContext);
        }

        public override void OnResultExecuted(ResultExecutedContext filterContext)
        {
            System.Console.WriteLine("------OnResultExecuted------");
            base.OnResultExecuted(filterContext);
        }
    }
}
